import React, { Component } from 'react';
import {withRouter} from 'react-router-dom'

import back from '@a/images/back2.png'

@withRouter
class Header extends Component {
  handleClick=(props)=>{
    let  {history}  = this.props
    history.goBack()
  }
  render() {
    return (
      <div style={{
        backgroundColor: 'rgba(48,139,254)',
        position: 'fixed',
        zIndex:'999',
        width: '100%',
        top:0
      }}>
        <header style={{
          height: '.44rem',
          lineHeight: '.44rem',
          textAlign: 'center',
          fontSize: '.17rem',
          backgroundColor: 'rgba(48,139,254)',
          color: '#fff',
          padding: '0 0.09rem',
          display: 'flex',
          alignItems: 'center',
        }}>
          <img 
          onClick={this.handleClick}
          src={`${back}`} 
          style={{ width: '0.085rem', height: '0.15rem' }} 
          alt='' />
          <span style={{ flex: '1' }}>{this.props.title}</span>
          <i style={{ width: '0rem' }}></i>
        </header>
        <div></div>
      </div>
    );
  }
}
export default Header